home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 February / EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso / earcd / patches / fw30nt30.lha / Install FinalWriter-030 < prev    next >
Text File  |  1995-01-12  |  2KB  |  82 lines

  1. ; $VER: FinalWriter-030_Install 1.3 (12.1.95)
  2.  
  3. (set version "3.0")
  4.  
  5. (onerror (exit (quiet)))
  6.  
  7. (message
  8.     "\n\nFinalWriter " version "-030 International"
  9.     "\nCopyright 1995 Martin Berndt"
  10.     "\n\n\nThis Patch is SHAREWARE !"
  11.     "\n\nPlease read the \"ReadMe.txt\" file."
  12. )
  13.  
  14. (set @default-dest
  15.     (askdir
  16.         (prompt "Where is your FinalWriter Drawer?")
  17.         (help @askfile-help)
  18.         (default "SYS:FinalWriter")
  19.         (newpath)
  20.     )
  21. )
  22.  
  23. (set language
  24.     (askchoice
  25.         (prompt "Select Language")
  26.         (help @askchoice-help)
  27.         (choices "US1  23-Nov-94 (American English)"
  28.              "US2  14-Dec-94 (American English)"
  29.              "GB   23-Nov-94 (British English)"
  30.              "GER1  7-Dec-94 (German)"
  31.              "GER2 14-Dec-94 (German)")
  32.     )
  33. )
  34.  
  35. (set backup
  36.     (askoptions
  37.         (prompt "Options")
  38.         (help @askoptions-help)
  39.         (choices "Create Backup Files")
  40.     )
  41. )
  42.  
  43. (set n 0)
  44. (set percent 0)
  45.  
  46. (while (set name (select n "FinalWriter" "swpost.library" "swshell.library"
  47.                "cachemap.library" "qfont.library" "")) (
  48.     (set n (+ n 1))
  49.     (complete percent)
  50.     (if (= n 1)
  51.         (set file name)
  52.         (set file (cat "FWLibs/" name))
  53.     )
  54.     (set newfile (tackon @default-dest file))
  55.     (set oldfile (cat newfile ".bak"))
  56.     (if (= (exists newfile) 0)
  57.         (abort name " not found!")
  58.     )
  59.     (rename newfile oldfile)
  60.     (if (< n 4) (
  61.         (if (= n 1)
  62.             (set name (cat name (select language "US1" "US2" "GB" "GER1" "GER2")))
  63.         )
  64.         (working "\n\n" newfile)
  65.         (if (<> (run (cat "spatch \"-o" newfile "\" -p" name ".pch \"" oldfile "\"")) 0) (
  66.             (rename oldfile newfile)
  67.             (abort "Wrong Version!")
  68.         ))
  69.         (set percent (+ percent 30))
  70.     ) (
  71.         (copyfiles
  72.             (prompt "Copying " name)
  73.             (help @copyfiles-help)
  74.             (source name)
  75.             (dest (tackon @default-dest "FWLibs"))
  76.             (optional "force" "askuser")
  77.         )
  78.         (set percent (+ percent 5))
  79.     ))
  80.     (if (= backup 0) (delete oldfile))
  81. ))
  82.